package com.czk.model.command;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/5/8 21:59
 */
// 电灯关闭命令
public class LightOffCommand implements Command {
    private LightReceiver lightReceiver;
    public LightOffCommand(LightReceiver lightReceiver){
        this.lightReceiver=lightReceiver;
    }
    @Override
    public void execute() {
        lightReceiver.off();
    }

    @Override
    public void undo() {
        lightReceiver.on();
    }
}
